//
//  UICollectionView+UICollectionViewNightMode.m
//  Topit
//
//  Created by dllo on 15/12/16.
//  Copyright © 2015年 YXY. All rights reserved.
//

#import "UICollectionView+UICollectionViewNightMode.h"

@implementation UICollectionView (UICollectionViewNightMode)
- (void)nightMode {
    NSUserDefaults *user = [NSUserDefaults standardUserDefaults];
    NSString *mode = [user objectForKey:@"NightMode"];
    if ([mode isEqualToString:@"Night"]) {
        self.backgroundColor = [UIColor colorWithRed:34 / 255.0 green:34 / 255.0 blue:34 / 255.0 alpha:1];
    }else {
        self.backgroundColor = [UIColor whiteColor];
    }
}
@end
